//
//  CommendHistoryTableViewController.m
//  GoodWayClient
//
//  Created by HuiDong on 15/12/18.
//  Copyright © 2015年 HuiDong. All rights reserved.
//

#import "CommendHistoryTableViewController.h"
#import "CommendHistoryTableViewCell.h"

@interface CommendHistoryTableViewController ()
@property (nonatomic,strong)NSArray *array;
@end

@implementation CommendHistoryTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//懒加载
- (NSArray *)array
{
    if (!_array) {
        _array = @[@{@"name":@"徐朝晖",@"iphone":@"1111111",@"state":@"1"},@{@"name":@"徐朝晖",@"iphone":@"1111111",@"state":@"1"},@{@"name":@"徐朝晖",@"iphone":@"1111111",@"state":@"1"},@{@"name":@"徐朝晖",@"iphone":@"1111111",@"state":@"1"},@{@"name":@"徐朝晖",@"iphone":@"1111111",@"state":@"1"},];
    }
    return _array;
}


//数据源方法
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.array.count;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    CommendHistoryTableViewCell *cell = [CommendHistoryTableViewCell CommendHistoryWithTableView:tableView];
    cell.dic = self.array[indexPath.row];
    return cell;
}

//设置行高
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 120;
}


@end
